/////////////////////////////////////////////////////////////////////////////
// Original code from libhdfs3. Copyright (c) 2013 - 2014, Pivotal Inc.
// All rights reserved. Author: Zhanwei Wang
/////////////////////////////////////////////////////////////////////////////
//  Modifications by Kumo Inc.
// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//



#pragma once

#include <stdint.h>

namespace Hdfs {

/**
 * file system statistics
 */
class FileSystemStats {
public:
    /**
     * To construct a FileSystemStats.
     */
    FileSystemStats() :
        capacity(-1), used(-1), remaining(-1) {
    }

    /**
     * To construct a FileSystemStats with given values.
     * @param capacity the capacity of file system.
     * @param used the space which has been used.
     * @param remaining available space on file system.
     */
    FileSystemStats(int64_t capacity, int64_t used, int64_t remaining) :
        capacity(capacity), used(used), remaining(remaining) {
    }

    /**
     * Return the capacity in bytes of the file system
     * @return capacity of file system.
     */
    int64_t getCapacity() {
        return capacity;
    }

    /**
     * Return the number of bytes used on the file system
     * @return return used space.
     */
    int64_t getUsed() {
        return used;
    }

    /**
     * Return the number of remaining bytes on the file system
     * @return return available space.
     */
    int64_t getRemaining() {
        return remaining;
    }

private:
    int64_t capacity;
    int64_t used;
    int64_t remaining;

};

}
